public class MarketCategoriesPanel : MarketPanel
{
	public override void Awake()
	{
		base.Awake();
	}

	public override void InitButtons()
	{
		base.InitButtons();
		int num = 0;
		foreach (MarketProductsHierarchy.MarketCategory marketCategory in MarketController.Instance.ProductHierarchy.marketCategories)
		{
			if (!marketCategory.name.Equals("Hidden"))
			{
				SetButton(marketCategory.name, num, -1f);
				num++;
			}
		}
		buttonsGrid.repositionNow = true;
	}

	public override void Select(string item, bool selectDefault = true)
	{
		if (string.IsNullOrEmpty(item) || selected.Equals(item))
		{
			return;
		}
		base.Select(item);
		switch (selected)
		{
		case "Weapons":
			MarketControllerUI.instance.SetBackgroundTexture("BgWeaponShop");
			break;
		case "Looks":
			MarketControllerUI.instance.SetBackgroundTexture("BgSkinsShop");
			break;
		case "Armor":
			MarketControllerUI.instance.SetBackgroundTexture("BgWeaponShop");
			break;
		case "Rides":
			MarketControllerUI.instance.SetBackgroundTexture("BgCarShop");
			break;
		case "Best":
			MarketControllerUI.instance.SetBackgroundTexture("BgWeaponShop");
			break;
		}
		MarketControllerUI.instance.SetMarketWidth(selected == "Rides");
		if (selectDefault)
		{
			MarketControllerUI.instance.subcategoriesPanel.Select(MarketController.Instance.ProductHierarchy.marketCategories.Find((MarketProductsHierarchy.MarketCategory c) => c.name.Equals(item)).dafaultSubcategory);
			MarketControllerUI.instance.subcategoriesPanel.InitButtons();
		}
	}
}
